# 作者: 家里蹲 吴越洋
# 2023年03月02日19时32分54秒

def binary_search(arr,k):
    length=len(arr)
    low=0
    high=length-1
    while low<=high:
        mid=(low+high)//2
        if k==arr[mid]:
            print(mid)
            break
        if k>arr[mid]:
            low=mid+1
        else:
            high=mid-1
    else:
        print("未找到")

if __name__ == '__main__':
    arr=[1,5,9,10,55,66,73,81,90,99]
    binary_search(arr,55)